<?xml version="1.0" encoding="UTF-8"?>
<K3Datas xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
	xsi:noNamespaceSchemaLocation="k3SaveData.xsd">
	<!-- 下面是个完整的示例 begin -->
	<K3Data key="">
		<mutiItemSql prefix="" separator=""><!-- 保存多条数据用的sql -->
			<IDGeneral key="" target="">
				<SQL></SQL>
			</IDGeneral>
			<seqGeneral target="">
				<SQL></SQL>
				<class></class>
			</seqGeneral>
			<content>
			</content>
		</mutiItemSql>
		<singleItemSql prefix=""><!-- 保存单条数据用的sql -->
			<IDGeneral key="" target="">
				<SQL></SQL>
			</IDGeneral>
			<content>
			</content>
			<seqGeneral target="">
				<SQL></SQL>
				<class></class>
			</seqGeneral>
		</singleItemSql>
		<builder>
		</builder>
		<IDGeneral key="" target="">
			<SQL></SQL>
		</IDGeneral>
		<seqGeneral target="" key="">
			<SQL></SQL>
			<class></class>
		</seqGeneral>
	</K3Data>
	<!-- 下面是个完整的示例 end -->

	<K3Data key="expenseRimburse">
		<seqGeneral target="FBillNo" key="seq">
			<SQL>select max(t.FID) as maxid from t_BM_ExpReimbursement t</SQL>
			<class>cn.firstsoft.modules.workflow.integration.implement.SeqGeneralK3</class>
		</seqGeneral>
		<mutiItemSql prefix="s_" separator="_"><!-- 保存多条数据用的sql -->
			<IDGeneral key="" target="">
				<SQL></SQL>
			</IDGeneral>
			<content>
				INSERT INTO t_BM_ExpReimbursementEntry
				(FID, FIndex,
				FMgAcctID, FExpID, FOccurDate, FBillNo_SRC, FClassID_SRC,
				FID_SRC,
				FEntryID_SRC, FItemClassID, FItemID,
				FSubmitAmt, FSubmitAmtFor,
				FApprovedAmt, FApprovedAmtFor, FTaxSubmitAmt,
				FTaxSubmitAmtFor,
				FTaxRate, FTaxAmt, FTaxAmtFor,
				FRPAcctID, FAPAcctID, FNote,
				FApplyAmount, FApplyAmountFor, FCheckPayAmount,
				FCheckPayAmountFor,
				FApplyRefundAmount,
				FApplyRefundAmountFor, FCheckRefundAmount,
				FCheckRefundAmountFor, FLoadAmount,
				FLoadAmountFor, FCashAccountID,
				FBankAccountName, FBankBranch, FBankAccount, FDeptID, FProductID,
				FPayAmount,
				FRePayAmount, FOffLoadAmount, FNotPayAmount,
				FTransferAmt, FTransferAmtFor)
				VALUES (@FID@, 1, 0, @FExpID@,
				'@FOccurDate@', '',
				1000050, 0, 0, @FItemClassID@, @FItemID@,
				@FSubmitAmt@, @FSubmitAmtFor@, @FApprovedAmt@, 0, @FTaxSubmitAmt@,
				@FTaxSubmitAmtFor@, @FTaxRate@, @FTaxAmt@, 0.0000000000,
				@FRPAcctID@, @FAPAcctID@, '', @FApplyAmount@, 0.0000000000,
				@FCheckPayAmount@,
				@FCheckPayAmountFor@, 0.0000000000,
				0.0000000000,
				0.0000000000, 0.0000000000, 0.0000000000, 0.0000000000, 0,
				'', '',
				'', 0, 0, 0.0000000000, 0.0000000000, 0.0000000000,
				@FNotPayAmount@,
				0.0000000000, 0.0000000000) select scope_identity()
			</content>
		</mutiItemSql>
		<singleItemSql prefix="m_"><!-- 保存单条数据用的sql -->
			<IDGeneral key="" target="">
				<SQL></SQL>
			</IDGeneral>
			<content>
				<![CDATA[
						INSERT INTO t_BM_ExpReimbursement
							(FID,FClassTypeID,FBillNo,FDate,FProposerID,FDeptID,FCurrencyID,FExchangeRate,FSettleID,FPaymentBillNo,FCheckerID,FBillerID,
							FBillDate,FRequestDeptID,FIsCompReim,FExchangeRateType,FCheckStatus,FIsApplyRefund,FIsChargeAccount,FIsRelExpense,FVoucherID,
				            FVchBillNo,FMultiCheckStatus)
						VALUES
						    (@FID@,1000050,'@FBillNo@','@FDate@',@FProposerID@,@FDeptID@,@FCurrencyID@,'@FExchangeRate@',@FSettleID@,'',@FCheckerID@,@FBillerID@,
							'@FBillDate@',@FRequestDeptID@,'1',@FExchangeRateType@,2,0,0,0,0,
							'','16') select scope_identity()
		        	]]>
			</content>
		</singleItemSql>
		<builder>cn.firstsoft.modules.workflow.integration.implement.SQLBuilderCommonImpl
		</builder>
		<IDGeneral key="mainID" target="FID">
			<SQL>
				select max(t.FID) as maxid from t_BM_ExpReimbursement t
			</SQL>
		</IDGeneral>
	</K3Data>

	<K3Data key="feeApplicationToK3">
		<mutiItemSql prefix="z_" separator="_"><!-- 保存多条数据用的sql -->
			<content>
				insert into FYGL_ExpenseApplyEntry
				(FID,FApplyAmount,FBankAccount,FBankAccountName,FBankBranch,FCashAccountID,FChargeID,FCheckAmount,FCheckAmountFor,FClassID_SRC,FContactAccountID,FEntryID_SRC,FID_SRC,FIndex,FItemClassType,FItemID,FLoadBalanceAmount,FOffAmount,FPayAmount,FReduceAmount,FRemark,FRePayAmount,FRepaymentDate,FSettleTypeID,FSourceBillNo,FSourceClassTypeID)
				values
				(@FID@,@FApplyAmount@,'','','',@FCashAccountID@,@FChargeID@,@FCheckAmount@,@FCheckAmountFor@,0,@FContactAccountID@,0,0,1,@FItemClassType@,@FItemID@,0,0,0,0,'',0,'@FRepaymentDate@',@FSettleTypeID@,'',0)  select scope_identity()
			</content>
		</mutiItemSql>
		<singleItemSql prefix="m_"><!-- 保存单条数据用的sql -->
			<content>
				insert into FYGL_ExpenseApply
				( FID,FClassTypeID,FBillNo,FBiller,FDate,FCheckerID,FCheckDate,FIsImport,FNote,FApplyerID,FApplyDate,FApplyDepartmentID,FTele,FCurrencyID,FExchangeRateType,FExchangeRate,FBudgetExpense,FSettleTypeID,FCheckStatus,FIsLoad,FIsChargeAccount,FIsPrePay,FAccessoryCount,FVoucherID,FProjectID,FVchBillNo,FMultiCheckStatus)
				VALUES
				( @FID@,'@FClassTypeID@','@FBillNo@','@FBiller@','@FDate@','@FCheckerID@','@FCheckDate@','@FIsImport@','@FNote@','@FApplyerID@','@FApplyDate@','@FApplyDepartmentID@','@FTele@','@FCurrencyID@','@FExchangeRateType@','@FExchangeRate@','@FBudgetExpense@','@FSettleTypeID@','@FCheckStatus@','@FIsLoad@','@FIsChargeAccount@','@FIsPrePay@','@FAccessoryCount@','@FVoucherID@','@FProjectID@','@FVchBillNo@','@FMultiCheckStatus@')
			</content>
		</singleItemSql>
		<builder>cn.firstsoft.modules.workflow.integration.implement.SQLBuilderCommonImpl
		</builder>
		<IDGeneral key="" target="FID">
			<SQL>SELECT max(FID) FROM FYGL_ExpenseApply</SQL>
		</IDGeneral>
		<seqGeneral target="FBillNo" key="seq">
			<SQL>select max(t.FID) as maxid from FYGL_ExpenseApply t</SQL>
			<class>cn.firstsoft.modules.workflow.integration.implement.SeqGeneralK3</class>
		</seqGeneral>
	</K3Data>

</K3Datas>